import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../components/Login.vue'
import Home from '../components/Home.vue'
import Welcome from '../components/Welcome.vue'
import PortForm from '../components/CompanyForm/PortForm.vue'
import FcForm from '../components/CompanyForm/FcForm.vue'
import DeliveryForm from '../components/In-outForm/DeliveryForm.vue'
import EnterForm from '../components/In-outForm/EnterForm.vue'
import PortQuery from '../components/PortQuery/PortQuery.vue'
import FcQuery from '../components/FcQuery/FcQuery.vue'
import Delivery from '../components/Delivery/Delivery.vue'
import Enter from '../components/Enter/Enter.vue'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/login'
  },
  {
    path: '/login',
    name: 'Login',
    component: Login
  },
  {
    path: '/home',
    name: 'Home',
    component: Home,
    redirect: '/welcome',
    children: [{
      path: '/welcome',
      name: 'Welcome',
      component: Welcome
    },
    {
      path: '/portform',
      name: 'PortForm',
      component: PortForm
    },
    {
      path: '/fcform',
      name: 'FcForm',
      component: FcForm
    },
    {
      path: '/deliveryform',
      name: 'DeliveryForm',
      component: DeliveryForm
    },
    {
      path: '/enterform',
      name: 'EnterForm',
      component: EnterForm
    },
    {
      path: '/portquery',
      name: 'PortQuery',
      component: PortQuery
    },
    {
      path: '/fcquery',
      name: 'FcQuery',
      component: FcQuery
    },
    {
      path: '/delivery',
      name: 'Delivery',
      component: Delivery
    },
    {
      path: '/enter',
      name: 'Enter',
      component: Enter
    }]
  }
]

const router = new VueRouter({
  routes
})

export default router
